package com.leiyuee.gulimall.seckill;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 1、整合Sentinel
 *  1） 导入依赖Spring-cloud-start-alibaba-sentinel
 *  2）下载sentinel控制台
 *  3）配置sentinel控制台地址信息
 *  4）在控制台调整参数【默认是所有的流控设置是保存在内存中的，重启后失效】
 * 2、每一个微服务都需要导入extuator(),并配合management.endpoint.web.exposure.include=* 开启所有监听
 * 3、定义流控返回数据
 *
 * 4、使用sentinel来保护feign远程调用
 *
 *
 *
 *
 *
 */
@EnableRedisHttpSession     //开启springsession
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class GulimallSeckillApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallSeckillApplication.class, args);
    }

}
